<include file="Index/header" />


<div class="container">
	<nav class="navbar navbar-default" role="navigation">
		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
			<ul class="nav navbar-nav">
				<li><a href="?m=admin&c=category&a=add" class="glyphicon glyphicon-plus">新增分类</a></li>
			</ul>
			<form class="navbar-form navbar-right" action="?m=admin&c=goods&a=query" method="post" role="search">
				<div class="form-group">
					<input type="text" class="form-control" placeholder="商品名称" id="gn" name="gn" />
				</div> <button type="submit" class="btn btn-default">搜索</button>
			</form>
		</div>
	</nav>
	<table class="table table-hover table-bordered">
		<thead>
			<tr>
				<th>
					分类编号
				</th>
				<th>
					分类名称
				</th>
				<th>
					操作
				</th>
			</tr>
		</thead>
		<tbody>
			<foreach name='categoryInfo' item="value">
				<tr>
					<td>
						{$value.category_id}
					</td>
					<td>
						{$value.category_name}
					</td>
					<td>
						<a href="?m=admin&c=category&a=cdelete&ci={$value.category_id}" class="btn btn-sm btn-danger"
							onclick="return del()">删除</a>
					</td>
				</tr>
			</foreach>
		</tbody>
	</table>

	<br />
	<br />
</div>


<script type="text/javascript">
	//确定删除
	function del() {
		if (window.confirm("危险操作，确定删除吗！")) {
			return true;
		} return false;
	} 
</script>
<include file="Index/footer" />